// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.vehicles;

import zombie.scripting.objects.VehicleScript;

public final class LightbarSirenMode {
    private int mode = 0;
    private final int modeMax = 3;

    public int get() {
        return this.mode;
    }

    public void set(int v) {
        if (v > 3) {
            this.mode = 3;
        } else if (v < 0) {
            this.mode = 0;
        } else {
            this.mode = v;
        }
    }

    public boolean isEnable() {
        return this.mode != 0;
    }

    public String getSoundName(VehicleScript.LightBar lightbar) {
        if (this.isEnable()) {
            if (this.mode == 1) {
                return lightbar.soundSiren0;
            }

            if (this.mode == 2) {
                return lightbar.soundSiren1;
            }

            if (this.mode == 3) {
                return lightbar.soundSiren2;
            }
        }

        return "";
    }
}
